This invention relates to a method of inspecting the surface condition of an object having a sloped surface with a high specular characteristic by using an image taken thereof, as well as to an apparatus using such a method and particularly to an apparatus for inspecting the surface conditions of a substrate having a plurality of soldered portions.
As disclosed in Japanese Patent Publication Tokko 6-1173, the present applicant has earlier developed an apparatus for automatically inspecting soldered portions of a substrate by an image processing method which makes use of the mirror reflection characteristic of the soldered portions. FIG. 16 shows the structure of such a substrate inspection apparatus and the principle of inspection thereby as disclosed in aforementioned Patent Publication, having three light sources 8, 9 and 10 for emitting red, green and blue light beams, respectively, and an image taking device 3 for obtaining an image of the object of inspection. In the figure, numeral 1 indicates a substrate and numeral 2 indicates a solder piece to be inspected, above which the light sources 8, 9 and 10 are arranged at different angles of elevation with respect to the substrate 1 and the solder piece 2 while the image taking device 3 is set such that the image of the solder piece 2 will be taken directly from above.
With an inspection apparatus thus structured, the colored beams of light from these individual light sources 8, 9 and 10 are projected onto the surface of the solder piece 2 from mutually different directions. If a beam of light is projected onto the sloped surface of solder piece 2 from such a direction that is symmetric with the direction to the image taking device 3 with respect to the line perpendicular to the slope at the point where the light is projected, the mirror-reflection of this projected beam will be directed toward the image taking device 3. In other words, the color of the mirror-reflected light made incident into the image taking device 3 will be different, depending upon the slope of the solder surface.
By the example of optical system shown in FIG. 16, the elevation angle as seen from the solder piece 2 is the largest for the, red light source 8 and that for the blue light source 10 is the smallest, the green light source 9 being positioned in between. Thus, if the solder piece 2 is spherical, as shown in FIG. 17, a color-partitioned image is obtained with the flat surface portion at the center appearing as a red image area, the steeply sloped surface portions close to the substrate surface appearing as a blue image area, and the intermediate gently sloped surface portions appearing as a green image area.
When a fillet of solder is inspected, as shown in FIG. 18, a color-partitioned image is obtained with the steeply sloped upper portion appearing as a blue image area, the gently sloped intermediate portion appearing as a green image area and the nearly horizontal lower portion near the substrate surface appearing as a red image area. In FIG. 18, symbol S1 indicates the range for a land.
In summary, an image partitioned into red, green and blue areas is obtained from a solder piece, depending on the change in the slope of its surface. Thus, the quality of the solder surface condition can be determined if a color image pattern of an ideally shaped solder piece is preliminarily registered and a comparison is made with such a registered pattern.
According to a prior art technology of apparatus for inspection based on the principle as described above, each of the red, green and blue color areas is extracted by preliminarily defining a binarization threshold value for each of red, green and blue gradation data comprising a digital color image and binarizing the image obtained from the image taking device 3 by using these binarization threshold values. Data such as position, shape and size of extracted areas from an image of an ideally shaped solder piece may be preliminarily registered such that the quality of a solder surface may be determined by comparing the colored areas of its image with the registered data.
With the optical system shown in FIG. 16, however, the brightness and the color on the image may be thought to vary as the brightness and the color of the illuminating light changes according to temperature and the time of use, and such variations in the brightness and the color may be considered to affect the result of extraction of the color areas. In the inspection of a solder piece, in particular, if the characteristic quantity of each color area changes due to a change in the color, it may become impossible to clear the standard set for a “good” product although the surface condition may be normal, and such a product may be judged defective.
In order to keep the accuracy of inspection at a high level, therefore, it is desirable to frequently change these binarization threshold values. Since inspection apparatus of this kind are required to keep repeating inspection processes with substrates being supplied incessantly one after another, the work efficiency is severely affected if the inspection must be stopped as the binarization threshold values are updated. Another problem is that it is difficult to judge the correct timing for updating the binarization threshold values.
As an alternative to the aforementioned binarization process, a pattern matching process may be carried out by using the image of an ideally mounted substrate as a model image. According to this method, since normalized correlation calculations are carried out between the image to be inspected and the model image, the threshold values for the judgment need not be changed although there may be a change in illumination. On the other hand, the correlation value drops even by a small change in the shape of the solder piece being inspected and the probability of obtaining a correct judgment result also deteriorates.
Moreover, the modern tendency is that substrates become smaller and more parts are mounted to them. As a result, the land area corresponding to each component part must be adjusted according to the density of mounting in the surrounding areas. As a result, the land size changes even for a same component, depending on the number of components mounted in the surrounding areas. Since the slope of a solder fillet comes to vary accordingly, depending on the mounting position of the component and hence the size and shape of each color area of a fillet image also become different. If there are relatively few components mounted near by, for example, the land may be made relatively big for the soldering stability and hence the slope of the fillet becomes gentler and the red, green and blue areas appear properly. In the case of a component mounted where the mounting density is relatively large, on the other hand, the land area must be accordingly diminished and the slope of the fillet becomes steep, the blue area becoming dominant and the green and red areas becoming smaller. Thus, the distribution of color areas on the image changes even for components of the same kind and hence the standard of judgment for each color area must be set for each component in order to maintain a high level of inspection accuracy.